public class Two_dimensional_Array_Matrices_Addition {
    public static void main(String[] args) {
        // 请在Begin-End间编写代码
        /**********Begin**********/
        // 定义并初始化两个矩阵
        int[][] a = {
                {5, 6, 7},
                {15, 65, 43},
                {32, 43, 22},
                {11, 88, 6},
                {4, 98, 66}
        };
        int[][] b = {
                {94, 65, 31},
                {0, 71, 98},
                {66, 88, 100},
                {32, 7, 1},
                {16, 2, 34}
        };

        // 计算矩阵和
        int[][] sum = new int[5][3];
        for (int i = 0; i < 5; i++) {
            for (int j = 0; j < 3; j++) {
                sum[i][j] = a[i][j] + b[i][j];  // 元素相加[[3]]
            }
        }

        // 输出结果
        for (int[] row : sum) {
            for (int num : row) {
                System.out.print(num + " ");    // 每元素后加空格[[16,20]]
            }
            System.out.println();
        }
        /**********End**********/
    }
}
/*
—— 预期输出 ——
        99 71 38
        15 136 141
        98 131 122
        43 95 7
        20 100 100
 */
